package com.qqt.csr.im.vo.resp;

import com.qqt.csr.common.enums.DeletedEnum;
import com.qqt.csr.common.sensitiveword.SensitiveWordMsg;
import com.qqt.csr.im.dto.MsgAccountDTO;
import com.qqt.csr.im.enums.MsgFlowTypeEnum;
import com.qqt.csr.im.enums.MsgTypeEnum;
import com.qqt.csr.im.enums.ReadFlagEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @Author: yang hao
 * @Date: 2024/10/15 16:57
 * @Description: 消息 视图对象
 **/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "MessageRespVO", description = "消息 视图对象")
public class MessageRespVO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "消息id")
    private String id;

    @Schema(description = "消息序号")
    private String seq;

    @Schema(description = "发送方")
    private MsgAccountDTO sender;

    @Schema(description = "接收方")
    private MsgAccountDTO recipient;

    @Schema(description = "会话id")
    private String conversationId;

    @Schema(description = "消息内容")
    private Object content;

    @Schema(description = "消息类型")
    private MsgTypeEnum type;

    @Schema(description = "消息流向")
    private MsgFlowTypeEnum flow;

    @Schema(description = "扩展信息")
    private String artificialExt;

    @Schema(description = "是否已读，0：未读，1：已读")
    private ReadFlagEnum readFlag;

    @Schema(description = "是否删除，0：未删除，1：已删除")
    private DeletedEnum deleted;

    @Schema(description = "创建时间")
    private Date createTime;

    @Schema(description = "更新时间")
    private Date updateTime;

    @Schema(description = "命中的敏感词位置")
    private List<SensitiveWordMsg> sensitiveWords;

}
